Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Fix dot file generation #1229

Merged
merged 2 commits into from
Jun 28, 2024
Merged

Fix dot file generation #1229

merged 2 commits into from
Jun 28, 2024

Conversation

mtreinish
Copy link
Member

This commit fixes a regression introduced in #1203. That PR was attempting to fix missing character escaping in some string fields but it was doing so too eagerly. This would result in invalid dot files being produced for users upgrading from rustworkx < 0.15.0 that were wrapping strings in quotes as needed previously. For example if you were setting 'color="#aaaaaa"' previously before this would become color="\"#aaaaaa\"" after #1203. In order to quickly release a 0.15.1 this commit reverts the dot generation component of #1203 but updates the code to wrap tooltip in addition to label which was what the original bug reported. In 0.16.0 we should investigate adding a flag to control the escaping behavior of the function to either decide to wrap values in quotes or not.

This commit fixes a regression introduced in Qiskit#1203. That PR was
attempting to fix missing character escaping in some string fields
but it was doing so too eagerly. This would result in invalid dot
files being produced for users upgrading from rustworkx < 0.15.0 that
were wrapping strings in quotes as needed previously. For example if you
were setting `'color="#aaaaaa"'` previously before this would become
`color="\"#aaaaaa\""` after Qiskit#1203. In order to quickly release a 0.15.1
this commit reverts the dot generation component of Qiskit#1203 but updates
the code to wrap tooltip in addition to label which was what the
original bug reported. In 0.16.0 we should investigate adding a flag to
control the escaping behavior of the function to either decide to wrap
values in quotes or not.
@coveralls
Copy link

coveralls commented Jun 28, 2024

Pull Request Test Coverage Report for Build 9706477584

Details

  • 4 of 4 (100.0%) changed or added relevant lines in 1 file are covered.
  • No unchanged relevant lines lost coverage.
  • Overall coverage increased (+0.004%) to 95.392%

Totals Coverage Status
Change from base Build 9704784541: 0.004%
Covered Lines: 17969
Relevant Lines: 18837

💛 - Coveralls

Copy link
Collaborator

@IvanIsCoding IvanIsCoding left a comment

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

We should have added a test case for that in hindsight

@coveralls
Copy link

coveralls commented Jun 28, 2024

Pull Request Test Coverage Report for Build 9711050707

Details

  • 4 of 4 (100.0%) changed or added relevant lines in 1 file are covered.
  • No unchanged relevant lines lost coverage.
  • Overall coverage increased (+0.004%) to 95.392%

Totals Coverage Status
Change from base Build 9704784541: 0.004%
Covered Lines: 17969
Relevant Lines: 18837

💛 - Coveralls

@mtreinish mtreinish merged commit ffcd38f into Qiskit:main Jun 28, 2024
28 checks passed
@mtreinish mtreinish deleted the fix-graphviz-15 branch June 28, 2024 10:26
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

Successfully merging this pull request may close these issues.

3 participants